An introductory guide to Git submodules
Git submodules are a powerful feature that often trips up developers. Fret not, this guide will help you understand the basics.
The Git snippet collection contains a variety of short tips and tricks for all currently maintained versions of git. It includes most commonly-used commands and covers various use-cases in the form of simplified documentation, complete with multiple examples.
Git submodules are a powerful feature that often trips up developers. Fret not, this guide will help you understand the basics.
Learn how to view or change the URL of the remote repository in Git.
If you're more of a visual person, you can view a graph of all commits and branches in the repository using a single Git command.
If you find yourself needing to fix a previous commit, you can create a fixup commit that can be autosquashed in the next rebase.
Git defaults to fast-forward merging when possible. But, what if you want to disable it by default? Let's see how you can do that.
Learn how to push and pull changes between local and remote repositories.
Rebase the current branch onto another branch in Git.
Did you make a mistake but haven't pushed your changes yet? Learn how to rewind back to a specific commit in Git.
Learn the simple way to undo a commit in Git without rewriting history.
Effortlessly create upstream branches on push by enabling a simple Git config setting.
If you want your team to follow a common format for commit messages, you can set up a commit message template to make it easier.
Did you set up a lot of Git aliases and forgot what they are? List them all with this command.
Learn how to leverage the power of git grep
to find matching files in your repository.
Learn how to view a short summary of your Git commits using git log.
Learn how to view the last commit in Git using the git log
command.
Learn how to eliminate the annoyance of copying dollar signs ($) along with terminal commands from the web with a simple bash alias.
Learn how to create a new commit in Git, along with tricks to skip Git hooks and create empty commits.
Learn how to fetch the latest changes from the remote repository in Git and keep your local repository up to date.
Is your Git repository getting bloated? Optimize it by garbage collecting loose objects.
Manually or automatically find which commit in history introduced a bug using.
Tired of manually specifying the remote branch name when pushing? Configure Git to use the current branch name as the default.
The first step to working with a Git repository is often to clone it to your local machine.
Ever needed to create a git commit with a different date? Here's a quick and easy way to do it.
Configure user information for Git to associate commits with a user.